/*
 * Copyright 2011 Mark Davidson.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package org.dctmcommons;

/**
 * Documentum specific String related helper methods. For more generic methods
 * try Google Guava or Apache Commons.
 * @author Mark Davidson
 */
public interface IStringHelper {

	/**
	 * Splits a repository path into path elements. No check is performed
	 * against the specified path to ensure that it actually exists in the
	 * repository. The root path (i.e. '/') is not included in the results.
	 * @param path The absolute repository path
	 * @param absolute Whether to return the path elements as absolute paths
	 * @return The list of path elements
	 */
	public String[] splitPath(String path, boolean absolute);
	
	/**
	 * Checks if the string value is empty (i.e. is null or zero length). Please
	 * note that the length is calculated after trimming the string value.
	 * @param value The string value
	 * @return The outcome (true = empty)
	 */
	public boolean isEmpty(final String value);
}
